<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>部署博客（Gitee） | CHRIS YANG</title><meta name="author" content="Chris"><meta name="copyright" content="Chris"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="使用Hexo博客框架搭建一个博客页，部署在Gitee的个人仓库上并且申请Gitee Pages服务，这样可以通过Gitee提供的域名访问博客 需要环境：nodejs，git Hexo的安装Hexo 是一个快速、简洁且高效的博客框架。Hexo 使用 Markdown（或其他标记语言）解析文章，在几秒内，即可利用靓丽的主题生成静态网页。 可通过以下命令安装hexo 1npm i -g hexo-cli">
<meta property="og:type" content="article">
<meta property="og:title" content="部署博客（Gitee）">
<meta property="og:url" content="https://strangerider.gitee.io/2023/07/24/%E5%8D%9A%E5%AE%A2%E9%83%A8%E7%BD%B2_Gitee/index.html">
<meta property="og:site_name" content="CHRIS YANG">
<meta property="og:description" content="使用Hexo博客框架搭建一个博客页，部署在Gitee的个人仓库上并且申请Gitee Pages服务，这样可以通过Gitee提供的域名访问博客 需要环境：nodejs，git Hexo的安装Hexo 是一个快速、简洁且高效的博客框架。Hexo 使用 Markdown（或其他标记语言）解析文章，在几秒内，即可利用靓丽的主题生成静态网页。 可通过以下命令安装hexo 1npm i -g hexo-cli">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://strangerider.gitee.io/images/lueluelue.gif">
<meta property="article:published_time" content="2023-07-24T07:14:45.808Z">
<meta property="article:modified_time" content="2023-07-25T09:55:22.907Z">
<meta property="article:author" content="Chris">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://strangerider.gitee.io/images/lueluelue.gif"><link rel="shortcut icon" href="/images/love.gif"><link rel="canonical" href="https://strangerider.gitee.io/2023/07/24/%E5%8D%9A%E5%AE%A2%E9%83%A8%E7%BD%B2_Gitee/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '部署博客（Gitee）',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2023-07-25 17:55:22'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
    win.getCSS = (url,id = false) => new Promise((resolve, reject) => {
      const link = document.createElement('link')
      link.rel = 'stylesheet'
      link.href = url
      if (id) link.id = id
      link.onerror = reject
      link.onload = link.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        link.onload = link.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(link)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 6.3.0"></head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/images/lueluelue.gif" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">4</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">0</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><hr class="custom-hr"/></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background: #00000000"><nav id="nav"><span id="blog-info"><a href="/" title="CHRIS YANG"><span class="site-name">CHRIS YANG</span></a></span><div id="menus"><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">部署博客（Gitee）</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2023-07-24T07:14:45.808Z" title="发表于 2023-07-24 15:14:45">2023-07-24</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-07-25T09:55:22.907Z" title="更新于 2023-07-25 17:55:22">2023-07-25</time></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="部署博客（Gitee）"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><p>使用Hexo博客框架搭建一个博客页，部署在Gitee的个人仓库上并且申请Gitee Pages服务，这样可以通过Gitee提供的域名访问博客</p>
<p>需要环境：nodejs，git</p>
<h2 id="Hexo的安装"><a href="#Hexo的安装" class="headerlink" title="Hexo的安装"></a>Hexo的安装</h2><p>Hexo 是一个快速、简洁且高效的博客框架。Hexo 使用 <a target="_blank" rel="noopener" href="http://daringfireball.net/projects/markdown/">Markdown</a>（或其他标记语言）解析文章，在几秒内，即可利用靓丽的主题生成静态网页。</p>
<p>可通过以下命令安装hexo</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm i -g hexo-cli</span><br></pre></td></tr></table></figure>

<p>官方地址：<a target="_blank" rel="noopener" href="https://hexo.io/zh-cn/docs/index.html">文档 | Hexo</a></p>
<h2 id="第一篇博客"><a href="#第一篇博客" class="headerlink" title="第一篇博客"></a>第一篇博客</h2><h3 id="创建博客"><a href="#创建博客" class="headerlink" title="创建博客"></a>创建博客</h3><p>在想创建的地方运行命令行工具，使用下面的命令创建博客目录：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo init 目录名</span><br></pre></td></tr></table></figure>

<p>目录创建后cd进入目录，然后可以使用下面命令来创建一篇博客：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo new 文件名</span><br></pre></td></tr></table></figure>

<h3 id="Hexo博客的重要文件"><a href="#Hexo博客的重要文件" class="headerlink" title="Hexo博客的重要文件"></a>Hexo博客的重要文件</h3><p>在博客生成后还没有获得完整的文件夹，这个时候还要用命令：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo g</span><br></pre></td></tr></table></figure>

<p>生成本地文件，这样博客的目录算是完整了，然后可以在目录里面找到这几个文件</p>
<ol>
<li><p>_config.yml：算是博客的配置文件，有关于博客的数据的很多设置都在这里，为什么是数据，因为Hexo博客的样式是可以配置不同的主题的（使用哪个主题也由它配置），而样式的具体配置则一般在主题的配置文件里面。</p>
</li>
<li><p>public：它里面是会被推送到仓库里的文件，博客主页的资源也是放在这里面的。</p>
<p>有关于这点的官方解释（<a target="_blank" rel="noopener" href="https://hexo.io/zh-cn/docs/one-command-deployment.html">部署 | Hexo</a>）是：<em>当执行 <code>hexo deploy</code> 时，Hexo 会将 <code>public</code> 目录中的文件和目录推送至 <code>_config.yml</code> 中指定的远端仓库和分支中，并且<strong>完全覆盖</strong>该分支下的已有内容。</em></p>
</li>
<li><p>source&#x2F;_posts：存放博客的位置</p>
</li>
<li><p>themes：存放主题的位置</p>
</li>
</ol>
<h2 id="博客部署到Gitee"><a href="#博客部署到Gitee" class="headerlink" title="博客部署到Gitee"></a>博客部署到Gitee</h2><h3 id="环境配置"><a href="#环境配置" class="headerlink" title="环境配置"></a>环境配置</h3><h4 id="安装环境"><a href="#安装环境" class="headerlink" title="安装环境"></a>安装环境</h4><p>需要安装hexo-deployer-git：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm i --save hexo-deployer-git</span><br></pre></td></tr></table></figure>

<h4 id="修改-config-yml设置"><a href="#修改-config-yml设置" class="headerlink" title="修改_config.yml设置"></a>修改_config.yml设置</h4><p>配置文件需要进行如下修改：</p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//网页地址，可以在Gitee Pages服务里面找到，如果用的是自己的用户名开的仓库应该就只有到io就结束了</span></span><br><span class="line">url<span class="punctuation">:</span> https<span class="punctuation">:</span><span class="comment">//strangerider.gitee.io/XXXX</span></span><br><span class="line"></span><br><span class="line"><span class="comment">//下方的repo和branch可能需要自己新增，repo是仓库ssh地址，branch则是分支名</span></span><br><span class="line">deploy<span class="punctuation">:</span></span><br><span class="line">  type<span class="punctuation">:</span> &#x27;git&#x27;</span><br><span class="line">  repo<span class="punctuation">:</span> git@gitee.com<span class="punctuation">:</span>strangerider/strangerider.git</span><br><span class="line">  branch<span class="punctuation">:</span> master</span><br></pre></td></tr></table></figure>

<h3 id="git设置"><a href="#git设置" class="headerlink" title="git设置"></a>git设置</h3><p>在目录下打开git bash，进行：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git init</span><br></pre></td></tr></table></figure>

<p>它会默认创建分支名（一般是master或者main），然后连接远程仓库：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git remote add origin 仓库的https或者ssh</span><br></pre></td></tr></table></figure>

<h3 id="gitee设置"><a href="#gitee设置" class="headerlink" title="gitee设置"></a>gitee设置</h3><h4 id="创建仓库"><a href="#创建仓库" class="headerlink" title="创建仓库"></a>创建仓库</h4><p>首先需要创建一个与自己账号同名的仓库，<u>这个名字指的是个人主页的名字下面那个带@的，然后去掉@</u>。</p>
<p>当然也可以随便取名，区别在于域名的仓库名不一样<code>https://strangerider.gitee.io</code>&#x2F;仓库名，如果是用户名的仓库则地址可以没有这个仓库名，<em>配置文件<code>_config.yml</code>的url设置里面最好也不要，不然似乎引用文件时会有奇奇怪怪的问题。</em></p>
<p>（创建仓库的时候可以通过设置模板添加默认的README.md）</p>
<p>然后在仓库页面的操作栏找到<strong>服务&gt;Gitee Pages</strong>给它打开，但是需要把仓库设置为开源仓库。</p>
<p>仓库就设置完了。</p>
<h4 id="配置ssh"><a href="#配置ssh" class="headerlink" title="配置ssh"></a>配置ssh</h4><p>这里是最坑的地方，因为很可能会在Gitee的<em>仓库&gt;管理&gt;部署公钥管理&gt;添加公钥</em>就给它配置了，但是实际上这只是配置只读权限的ssh公钥，配置能写的公钥还需要在右上角看到那行<strong>如果您想要对仓库进行写操作，请<a target="_blank" rel="noopener" href="https://gitee.com/profile/sshkeys">添加个人公钥</a></strong></p>
<p>那么公钥到底如何配置，首先命令行输入：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssh-keygen -t rsa -C <span class="string">&#x27;你gitee绑定的邮箱&#x27;</span></span><br></pre></td></tr></table></figure>

<p>这个时候应该提示：</p>
<ul>Enter file in which to save the key (/默认路径):</ul>

<p>这个时候敲回车则把ssh存在这个默认路径里边，可以一路回车，然后找到这个文件夹，或者存的文件夹里的id_rsa.pub打开，里面的就是ssh-rsa的东西，把它copy到gitee里面添加就好了</p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/soulwyb/article/details/90680676">码云 push时提示 DeployKey does not support push code fatal: Could not read from remote repository._@凌晨三点半的博客-CSDN博客</a></p>
<h3 id="部署"><a href="#部署" class="headerlink" title="部署"></a><div id="deploy">部署</div></h3><p>ssh配置好后，通过：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//也就是hexo generate (部署之前预先生成静态文件) &amp;&amp; hexo deploy (部署)，但是不建议这样一起用，因为老是出bug</span></span><br><span class="line">hexo g</span><br><span class="line">hexo d</span><br><span class="line"><span class="comment">//也可以这样，效果是一样的</span></span><br><span class="line">hexo d -g</span><br></pre></td></tr></table></figure>

<p>将博客文件推送到仓库中去。</p>
<p><em>注：一直推送不成功，可能需要hexo clean清除缓存（db.json），但是这样也会把已生成的文件也就是public里的文件清除掉，所以要注意保存文件，官方是说：在某些情况（尤其是更换主题后），如果发现您对站点的更改无论如何也不生效，您可能需要运行该命令。</em></p>
<h3 id="更新服务"><a href="#更新服务" class="headerlink" title="更新服务"></a><div id="refresh">更新服务</div></h3><p>在仓库的Gitee Pages服务页中进行更新。</p>
<p>然后博客就被部署上去了。</p>
<h3 id="以后的更新"><a href="#以后的更新" class="headerlink" title="以后的更新"></a>以后的更新</h3><p>执行上面的<a href="#deploy">部署</a>和<a href="#refresh">更新服务</a>两步就行了。</p>
<h3 id="更新不成功"><a href="#更新不成功" class="headerlink" title="更新不成功"></a>更新不成功</h3><h4 id="提交失败"><a href="#提交失败" class="headerlink" title="提交失败"></a>提交失败</h4><ol>
<li>提交失败是否切换到了正确的nodejs版本</li>
</ol>
<h4 id="没有更新"><a href="#没有更新" class="headerlink" title="没有更新"></a>没有更新</h4><ol>
<li>是否更新了Gitee Pages服务</li>
</ol>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="https://strangerider.gitee.io">Chris</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://strangerider.gitee.io/2023/07/24/%E5%8D%9A%E5%AE%A2%E9%83%A8%E7%BD%B2_Gitee/">https://strangerider.gitee.io/2023/07/24/%E5%8D%9A%E5%AE%A2%E9%83%A8%E7%BD%B2_Gitee/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://strangerider.gitee.io" target="_blank">CHRIS YANG</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"></div><div class="post_share"><div class="social-share" data-image="/images/lueluelue.gif" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="next-post pull-full"><a href="/2023/07/20/Ruoyi02/" title="Ruoyi学习02：项目中的Vue常用业务"><div class="cover" style="background: var(--default-bg-color)"></div><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">Ruoyi学习02：项目中的Vue常用业务</div></div></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/images/lueluelue.gif" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">Chris</div><div class="author-info__description"></div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">4</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">0</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/xxxxxx"><i class="fab fa-github"></i><span>Follow Me</span></a></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#Hexo%E7%9A%84%E5%AE%89%E8%A3%85"><span class="toc-number">1.</span> <span class="toc-text">Hexo的安装</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%AC%AC%E4%B8%80%E7%AF%87%E5%8D%9A%E5%AE%A2"><span class="toc-number">2.</span> <span class="toc-text">第一篇博客</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%88%9B%E5%BB%BA%E5%8D%9A%E5%AE%A2"><span class="toc-number">2.1.</span> <span class="toc-text">创建博客</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Hexo%E5%8D%9A%E5%AE%A2%E7%9A%84%E9%87%8D%E8%A6%81%E6%96%87%E4%BB%B6"><span class="toc-number">2.2.</span> <span class="toc-text">Hexo博客的重要文件</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8D%9A%E5%AE%A2%E9%83%A8%E7%BD%B2%E5%88%B0Gitee"><span class="toc-number">3.</span> <span class="toc-text">博客部署到Gitee</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE"><span class="toc-number">3.1.</span> <span class="toc-text">环境配置</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%AE%89%E8%A3%85%E7%8E%AF%E5%A2%83"><span class="toc-number">3.1.1.</span> <span class="toc-text">安装环境</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E4%BF%AE%E6%94%B9-config-yml%E8%AE%BE%E7%BD%AE"><span class="toc-number">3.1.2.</span> <span class="toc-text">修改_config.yml设置</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#git%E8%AE%BE%E7%BD%AE"><span class="toc-number">3.2.</span> <span class="toc-text">git设置</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#gitee%E8%AE%BE%E7%BD%AE"><span class="toc-number">3.3.</span> <span class="toc-text">gitee设置</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%88%9B%E5%BB%BA%E4%BB%93%E5%BA%93"><span class="toc-number">3.3.1.</span> <span class="toc-text">创建仓库</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E9%85%8D%E7%BD%AEssh"><span class="toc-number">3.3.2.</span> <span class="toc-text">配置ssh</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%83%A8%E7%BD%B2"><span class="toc-number">3.4.</span> <span class="toc-text">部署</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%9B%B4%E6%96%B0%E6%9C%8D%E5%8A%A1"><span class="toc-number">3.5.</span> <span class="toc-text">更新服务</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BB%A5%E5%90%8E%E7%9A%84%E6%9B%B4%E6%96%B0"><span class="toc-number">3.6.</span> <span class="toc-text">以后的更新</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%9B%B4%E6%96%B0%E4%B8%8D%E6%88%90%E5%8A%9F"><span class="toc-number">3.7.</span> <span class="toc-text">更新不成功</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%8F%90%E4%BA%A4%E5%A4%B1%E8%B4%A5"><span class="toc-number">3.7.1.</span> <span class="toc-text">提交失败</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%B2%A1%E6%9C%89%E6%9B%B4%E6%96%B0"><span class="toc-number">3.7.2.</span> <span class="toc-text">没有更新</span></a></li></ol></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/07/24/%E5%8D%9A%E5%AE%A2%E9%83%A8%E7%BD%B2_Gitee/" title="部署博客（Gitee）">部署博客（Gitee）</a><time datetime="2023-07-24T07:14:45.808Z" title="发表于 2023-07-24 15:14:45">2023-07-24</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/07/20/Ruoyi02/" title="Ruoyi学习02：项目中的Vue常用业务">Ruoyi学习02：项目中的Vue常用业务</a><time datetime="2023-07-20T08:51:19.370Z" title="发表于 2023-07-20 16:51:19">2023-07-20</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/07/20/Ruoyi01/" title="Ruoyi学习01：跑起项目与调整API转发">Ruoyi学习01：跑起项目与调整API转发</a><time datetime="2023-07-20T03:35:44.513Z" title="发表于 2023-07-20 11:35:44">2023-07-20</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/07/18/hello-world/" title="Hexo Light Document">Hexo Light Document</a><time datetime="2023-07-18T03:04:49.746Z" title="发表于 2023-07-18 11:04:49">2023-07-18</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2023 By Chris</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.min.js"></script><div class="js-pjax"></div><script id="click-show-text" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/click-show-text.min.js" data-mobile="true" data-text="喵呜" data-fontsize="20px" data-random="false" async="async"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>